/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package edu.pdx.cs.guavadata.query;

import edu.pdx.cs.guavadata.Channel;
import edu.pdx.cs.guavadata.Transform;

/**
 *
 * @author VuTran
 */
public class DropElement extends Operator {
    // DDL-like statement dropping an element from a domain
    
    String table;
    String column;
    String element;

    public String getColumn() {
        return column;
    }

    public void setColumn(String column) {
        this.column = column;
    }

    public String getElement() {
        return element;
    }

    public void setElement(String element) {
        this.element = element;
    }

    public String getTable() {
        return table;
    }

    public void setTable(String table) {
        this.table = table;
    }

    public DropElement(String table, String column, String element) {
        this.table = table;
        this.column = column;
        this.element = element;
    }
    
    @Override
    public boolean isQuery() {
        return false;
    }

    @Override
    public SqlText visit(Provider qv) {
        return qv.transform(this);
    }

    @Override
    public void visit(Channel c, String table) {
        c.mapAliases(this, table);
    }

    @Override
    public void visit(Transform t, Command c) {
        t.expand(this, c);
    }

    @Override
    public void notifyChange(Operator old, Operator newOp) {
        throw new UnsupportedOperationException("The method or operation is not implemented.");
    }

    @Override
    public Operator clone() {
        return new DropElement(table, column, element);
    }

}
